package com.mixfate.hystrix.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/user")
@RestController
public class UserHystrixController {

    @GetMapping("/{id}")
    public String findById(@PathVariable("id") String id) throws InterruptedException {
        String result = String.format("this is mixfate [%s] [%s]", id, System.currentTimeMillis());
        Thread.sleep(500);
        return result;
    }

}
